#ifndef PARSER_H
#define PARSER_H

#include "scanner.h"
#include "block.h"
#include "progcomp.h"
#include "progovr.h"
#include "errrptr.h"

namespace cnc {

	namespace compiler {

		class Parser
		{
			Scanner *scanner_;
			ProgramOverride *programOverride_;
			Token lookahead_;
			ProgramComponentID programComponent_;
			ErrorReporter *er_;
		public:
			Parser();
			void setErrorReporter(ErrorReporter *er);
			void reset();
			void setScanner(Scanner *scanner);
			void setProgramOverride(ProgramOverride *programOverride);
			ProgramComponentID getProgramComponent();
			unsigned long getProgramNumber();
			const char *getLeader();
			Block getBlock();
		};

	} // namespace compiler

} // namespace cnc

#endif
